package com.highspeed.bdk.bean.entity;

import com.bianmaba.spring.data.jpa.domain.annotations.QueryCacheable;
import com.highspeed.bdk.bean.base.IncrementEntity;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

/**
 * Created by chenjiabin on 2018/3/23.
 */
@Entity
@DynamicUpdate(true)
@DynamicInsert(true)
@QueryCacheable
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class ViewPostion extends IncrementEntity {
    @Column(nullable = false, length = 32)
    private String topologyTypeName;

    @Column(nullable = false)
    private Integer topologyId;

    @Column(nullable = false, length = 32)
    private String deviceTypeName;

    @Column(nullable = false)
    private Integer deviceId;

    //对象宽度
    @Column(nullable = false)
    private Double width;

    //对象高度
    @Column(nullable = false)
    private Double height;

    //起始横坐标
    @Column(nullable = false)
    private Double x;

    //起始纵坐标
    @Column(nullable = false)
    private Double y;

    //不透明度
    @Column()
    private Double opacity = 1.0d;

    //图标
    @Column(nullable = false, length = 255)
    private String icon;

    //颜色
    @Column(length = 16)
    private String color;

    //是否显示
    @Column
    private Boolean visible = true;

    public Double getWidth() {
        return width;
    }

    public void setWidth(Double width) {
        this.width = width;
    }

    public Double getHeight() {
        return height;
    }

    public void setHeight(Double height) {
        this.height = height;
    }

    public Double getX() {
        return x;
    }

    public void setX(Double x) {
        this.x = x;
    }

    public Double getY() {
        return y;
    }

    public void setY(Double y) {
        this.y = y;
    }

    public Double getOpacity() {
        return opacity;
    }

    public void setOpacity(Double opacity) {
        this.opacity = opacity;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public Boolean getVisible() {
        return visible;
    }

    public void setVisible(Boolean visible) {
        this.visible = visible;
    }

    public Integer getTopologyId() {
        return topologyId;
    }

    public void setTopologyId(Integer topologyId) {
        this.topologyId = topologyId;
    }

    public Integer getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(Integer deviceId) {
        this.deviceId = deviceId;
    }

    public String getTopologyTypeName() {
        return topologyTypeName;
    }

    public void setTopologyTypeName(String topologyTypeName) {
        this.topologyTypeName = topologyTypeName;
    }

    public String getDeviceTypeName() {
        return deviceTypeName;
    }

    public void setDeviceTypeName(String deviceTypeName) {
        this.deviceTypeName = deviceTypeName;
    }
}
